<header class="navbar-fixed-top navbar-inverse" style="background:#FFF">
  <div class="navbar" style="height:0">
    <div class="navbar-inner"> <div class="container">
      <div style="width: auto;" class="container">
        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </a>
        <%= link_to "Coffe 2 Go", root_path, {:class => "brand"} %>
        <div class="nav-collapse">
          <ul class="nav">
            <li class="active"><%=link_to (t "home"), root_path %></li>
            <li><%= link_to (t "product"), categories_path %></li>
          </ul>
          <form action="/search" method="get" class="navbar-search pull-left" accept-charset="UTF-8">
            <input type="text" id="keyword" name="keyword" placeholder="<%=(t "search")%>" class="search-query span2">
          </form>
          <ul class="nav pull-right">
            <li><%= link_to (t "cart"), "/cart" %></li>
            <li><a href="/cart" style="padding-left:0">(<span id="cart_display"><%= cart_count %></span>)</a></li>
            <% if signed_in? %>
            <li class="dropdown">
              <a data-toggle="dropdown" class="dropdown-toggle" href="#"><%= current_user.name %> <b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><%= link_to (t "profile"), edit_user_path(current_user) %></li>
                <%if isAdmin? %>
                <li><%= link_to (t "labeladmin"), "/admin/index" %></li>
                <%else%>
                <li><%= link_to (t "order"), "/order" %></li>
                <%end%>
                <li class="divider"></li>
                <li><%= link_to (t "signout"), signout_path, method: "delete" %></li>
              </ul>
            </li>
            <% else %>
            <li> <%= link_to (t "signin"), signin_path %></li> 
            <li><%= link_to (t "register"), signup_path %></li>
            <% end %>

            <li class="dropdown">
              <a data-toggle="dropdown" class="dropdown-toggle" href="">
                <%if( I18n.locale == I18n.default_locale )%> 
                <%="Ngôn ngữ"%>
                <%else%>
                <%="Language"%>
                <%end%>
              <b class="caret"></b></a>
              <ul class="dropdown-menu">
                <%if( I18n.locale == I18n.default_locale )%> 
                 <li><%= link_to "Tiếng Việt", '/switch_locale?locale=vn' %></li>
                <%else%>
                 <li><%= link_to "English", '/switch_locale?locale=en'%></li>
                <%end%>
              </ul>
            </li>

          </ul>
        </div><!-- /.nav-collapse -->
      </div>
    </div>
  </div><!-- /navbar-inner -->
</div>
</header>